import request from '@/utils/request'

// 获取角色列表
export function getList(currentPage,count,params) {
  return request({
    url: `/system/role/findPages/${currentPage}/${count}`,
    method: 'get',
    params:params
  })
}

// 根据角色id获取角色
export function getOne(roleId) {
  return request({
    url: `/system/role/${roleId}`,
    method: 'get'
  })
}

export function doAdd(data) {
  return request({
    url: '/system/role',
    method: 'post',
    data:data
  })
}

export function doEdit(data) {
  return request({
    url: 'system/role',
    method: 'put',
    data:data
  })
}

export function doDelete(roleId) {
  return request({
    url: '/system/role/' + roleId,
    method: 'delete'
  })
}
